home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / g_quake / server~1.zip / _SERVCON.QC < prev    next >
Text File  |  1996-10-04  |  3KB  |  98 lines

  1. /*
  2. **
  3. ** _servcon.qc (ServerConsole Code , 1.1)
  4. **
  5. ** Copyright (C) 1996 Johannes Plass
  6. ** 
  7. ** This program is free software; you can redistribute it and/or modify
  8. ** it under the terms of the GNU General Public License as published by
  9. ** the Free Software Foundation; either version 2 of the License, or
  10. ** (at your option) any later version.
  11. ** 
  12. ** This program is distributed in the hope that it will be useful,
  13. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. ** GNU General Public License for more details.
  16. **
  17. ** You should have received a copy of the GNU General Public License
  18. ** along with this program; if not, write to the Free Software
  19. ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. ** 
  21. ** Author:   Johannes Plass (plass@dipmza.physik.uni-mainz.de)
  22. **
  23. */
  24.  
  25. void(entity player) ServerConsoleInit =
  26. {
  27.   if (!USE_MODULE_SERVERCONSOLE) return;
  28.   // nothing to be done here.
  29. };
  30.  
  31. void(entity player) ServerConsoleInfo =
  32. {
  33.   if (!USE_MODULE_SERVERCONSOLE) return;
  34.   // nothing to be done here.
  35. };
  36.  
  37. void(entity player) ServerConsoleActiveMessage =
  38. {
  39.   if (!USE_MODULE_SERVERCONSOLE) return;
  40.               // 123456789#123456789#123456789#12345678
  41.   sprint(player,"  ServerConsole\n");
  42. };
  43.  
  44. void(entity player) ServerConsolePlayerEntered =
  45. {
  46.   if (!USE_MODULE_SERVERCONSOLE) return;
  47.   dprint (self.netname);
  48.   dprint (" entered the game\n");
  49. };
  50.  
  51. void(entity targ, entity attacker) ServerConsoleClientObituary =
  52. {
  53.   //dprint ("ServerConsoleClientObituary: executing\n");
  54.  
  55.   if (!USE_MODULE_SERVERCONSOLE) return;
  56.  
  57.   if (targ.classname == "player") {
  58.     if (attacker.classname == "teledeath") {
  59.       // telefragging
  60.       dprint(targ.netname);
  61.       dprint(" was telefragged by ");
  62.       dprint(attacker.netname);
  63.       dprint("\n");
  64.     } else if (attacker.classname == "teledeath2") {
  65.       // never seen in game, so may be wrong here
  66.       dprint(targ.netname);
  67.       dprint(" had an accident\n");
  68.     } else if (attacker.classname == "player") {
  69.       if (targ == attacker) {
  70.     // player killed by own weapon
  71.     dprint(targ.netname);
  72.     dprint(" had an accident\n");
  73.       }  else {
  74.     // attacker killed target
  75.     dprint(targ.netname);
  76.     dprint(" was killed by ");
  77.     dprint(attacker.netname);
  78.     dprint("\n");
  79.       }
  80.     } else {
  81.       // player killed by environment (slime, water, lava etc.)
  82.       dprint(targ.netname);
  83.       dprint(" had an accident\n");
  84.     }
  85.   }
  86. };
  87.  
  88. void(entity player) ServerConsoleClientSuicide =
  89. {
  90.   //dprint ("ServerConsoleClientSuicide: executing\n");
  91.   
  92.   if (!USE_MODULE_SERVERCONSOLE) return;
  93.   
  94.   dprint(player.netname);
  95.   dprint(" suicides\n");
  96. };
  97.  
  98.